#ifndef MOVIEVIEWER_H
#define MOVIEVIEWER_H
/*
enum Orientation {
	Horizontal = 0x1,
	Vertical = 0x2
};*/
struct DICOMStruct;

class TMovieViewer : public QDialog
{
	Q_OBJECT		
public:
	TMovieViewer();	
	TMovieViewer(int numberImg, int curNumber);
	~TMovieViewer();
	void pause();
	void play();
	void setListImages(int w, int l);
	void setListDicomStructs(QList <DICOMStruct *> listDicomStructs);


	void showEvent(QShowEvent * showEvent);
protected:
	int timer;
	int timerTime;
	BOOLEAN isCycle;
	int numberImg ;
	int curNumber;
	QImage * image;
	QList<QImage>::iterator i;
	QList<DICOMStruct *>::iterator iDicomStr;
	//unsigned char * pImage;
	QList <QImage> * listImages; 
	QList <DICOMStruct *> listDicomStructs;
	void paintEvent(QPaintEvent * event);
	void timerEvent(QTimerEvent * event);	

private:
	BOOLEAN isForwardDirection;
	QWidget * w1;
	QSlider * slider; //1, 100, 1, 1,
	QPushButton * b0;
	QPushButton * b1;
	QPushButton * b2;	
	QPushButton * b3;
	QPushButton * b4;
	QPushButton *bCodeVideo;

public slots:
	void valueChangeSlider(int val);
	void pressedPlayBack();
	void pressedPause();
	void pressedPlay();
	void pressedCycle();
	void pressedWL();
	void changeWL(int, int);
	void slotCodeVideo();

signals:
	void signalNextImage();
	void signalPrevImage();
	void signalFirstImage();
	void signalLastImage();
};

#endif //MOVIEVIEWER_H